<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>浮动初体验</title>
		<!--通过CSS样式表设置三个box的宽高及颜色-->
	<style>
		.box1,.box2,.box3{ 
			width:100px; height: 100px;
			margin: 10px 10px;
			}
		.box1{background-color: red;}
		.box2{background-color: royalblue;}
		.box3{background-color: aquamarine;}
		/*通过float浮动设置三个div横向排列*/
		.box1{float: left;}
		.box2{float: left;}
		.box3{float: right;}
	</style>
	</head>
	<body>
		<div class="box1"></div>
		<div class="box2"></div>
		<div class="box3"></div>
	</body>
</html>
